Telegram Group & Telegram Channel
Проверка отношения классов

Для того, чтобы проверить отношения двух классов или экземпляров (является ли класс классом наследником), есть две простые встроенные функции isinstance(object, classinfo) и issubclass(class, classinfo).

instance - возвращает True, если объект является экземпляром класса либо экземпляром подкласса данного класса.
issubclass — проверяет является ли класс наследником другого класса.

Данные функции зачастую применяются в ООП.

#isinstance #issubclass



tg-me.com/python_academy/1996
Create:
Last Update:

Проверка отношения классов

Для того, чтобы проверить отношения двух классов или экземпляров (является ли класс классом наследником), есть две простые встроенные функции isinstance(object, classinfo) и issubclass(class, classinfo).

instance - возвращает True, если объект является экземпляром класса либо экземпляром подкласса данного класса.
issubclass — проверяет является ли класс наследником другого класса.

Данные функции зачастую применяются в ООП.

#isinstance #issubclass

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/1996

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Launched in 2013, Telegram allows users to broadcast messages to a following via “channels”, or create public and private groups that are simple for others to access. Users can also send and receive large data files, including text and zip files, directly via the app.The platform said it has more than 500m active users, and topped 1bn downloads in August, according to data from SensorTower.

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

Python Academy from ms


Telegram Python Academy
FROM USA